#ifndef _EVENTH_
#define _EVENTH_
#include <iostream>
#include <string>
#include <vector>
#include <sqlite3.h>
#include <libsqlitewrapped.h>
#include <cstdlib>
using namespace std;

class Event {
	/* This class is used for all control over events. A similar class will be made for 
	 * todos, etc. I don't see a way to do this with derived classes, too much differs.
	 * There _was_ going to be a class for a DB controller for each class
	 * but, the need for it was eliminated thanks to me coming up with a better idea
	 */
	public:
	Event(Database* dbinit, int getid); //this constructor retrives from DB all the infoes and goes with it.
	//Event(Database db); //this creates a new event, inserts just the id and a bunch of nulls into the DB, which will then be update()d
	// if anyone feels like writing accessor methods for all these, go right ahead, but, I sure as fuck don't.
	int id; //gotta have ids :)
	string name;
	string details;
	int priority;
	string date;
	string time; //this will obviously be in a different format... this is temporary, probably boost time/date.
	bool actually_worth_doing; // :)
	string category_name; //both of these may be replaced with their own classes later.
	string class_name;
	
	void update(); //updates the DB with changed info.
	void remove(); //deletes this class from the DB.
	
	static vector<Event*> get_all_events(Database* db); /* gets a vector of all the 
	events in the database, useful for mass operations and maybe
	searching, though it'd be better to do that with SQLite */
	private:
	Database* db;
};
#endif
